<?php
//Selection de la table
$query_com = "SELECT * FROM  " . $database . "." . $tb_comment . " WHERE id_news_com = '$id'";
//Affichage de la selection
$result_com = @mysql_query($query_com) OR DIE("Erreur de la s&eacute;lection des news");
/* Mise en majuscule de la 1ere lettre du titre de la news */
$title_utf8 = utf8_decode($title);
$title_maj = substr($title_utf8, 0, 1);
$title_min = substr($title_utf8, 1);
$title_ok = strtoupper($title_maj) . $title_min;
/* Mise en majuscule de la 1ere lettre du pseudo de l'auteur */
$author_utf8 = utf8_decode($author);
$author_maj = substr($author_utf8, 0, 1);
$author_min = substr($author_utf8, 1);
$author_ok = strtoupper($author_maj) . $author_min;
/* Mise en majuscule de la 1ere lettre du texte de la news */
$content_utf8 = utf8_decode($content);
$content_maj = substr($content_utf8, 0, 1);
$content_min = substr($content_utf8, 1);
$content_ok = strtoupper($content_maj) . $content_min;
?>
<div class="news_titre rounded">
    <div class="news_title"><?php echo $title_ok; ?></div>
    <div class="news_info">Ajout&eacute; le: <img src="./images/icone/date.png" alt="date" /> <?php echo $date; ?>, par <b><a href="./user.php?user=<?php echo $author; ?>" class="mainlinks" title="Voir le profil de <?php echo $author_ok; ?>"><img src="./images/icone/author.png" alt="auteur" /> <?php echo $author_ok; ?></a></b></div> <br />
</div>
<div class="news_txt">
    <?php echo $content_ok; ?> <br />
    <br />
    <i><a href="./comment.php?news=<?php echo $id; ?>" class="px10" title="Lire les commentaires"><img src="./images/comment/comments.png" /> Lire les commentaires (<?php echo mysql_num_rows($result_com); ?>)</a></i> <br />
</div>
<hr />
<br />
